package com.vcms.cms.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Picture entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "picture", catalog = "vcms_0.1")
public class Picture implements java.io.Serializable {

	// Fields

	private Integer pictureId;
	private Content content;
	private String imgPath;
	private String description;
	private Integer priority;

	// Constructors

	/** default constructor */
	public Picture() {
	}

	/** full constructor */
	public Picture(Content content, String imgPath, String description,
			Integer priority) {
		this.content = content;
		this.imgPath = imgPath;
		this.description = description;
		this.priority = priority;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "pictureId", unique = true, nullable = false)
	public Integer getPictureId() {
		return this.pictureId;
	}

	public void setPictureId(Integer pictureId) {
		this.pictureId = pictureId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "contentId")
	public Content getContent() {
		return this.content;
	}

	public void setContent(Content content) {
		this.content = content;
	}

	@Column(name = "imgPath", length = 300)
	public String getImgPath() {
		return this.imgPath;
	}

	public void setImgPath(String imgPath) {
		this.imgPath = imgPath;
	}

	@Column(name = "description", length = 500)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "priority")
	public Integer getPriority() {
		return this.priority;
	}

	public void setPriority(Integer priority) {
		this.priority = priority;
	}

}